package com.huabo.contract.oracle.entity;

import java.math.BigDecimal;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hbfk.entity.TblStaffUtil;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.Date;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;

/**
 * <p>
 *
 * </p>
 *
 * @author huabo
 * @since 2022-03-15
 */
@Data
  @EqualsAndHashCode(callSuper = false)
    @TableName("TBL_CONTRACT_PAYMENT")
@ApiModel(value="TblContractPayment对象", description="")
public class TblContractPayment implements Serializable {

    private static final long serialVersionUID = 1L;
    public static final Long STATE_SP = Long.valueOf(1);
    public final static Long STATE_TZ = 2L;//调整
    public final static Long STATE_TG = 3L;//已通过
    public final static Long STATE_ZZ = 4L;//已终止
    public final static Long STATE_GZ = 5L;//已跟踪
    public final static Long STATE_WC = 6L;//已完成

      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "select HIBERNATE_SEQUENCE.nextval from dual")
      @TableId("PAYMENTID")
      private BigDecimal paymentid;

    @TableField("NODEID")
    private BigDecimal nodeid;

    //TblCyhwProjectbudget
    @TableField("BUDGETID")
    private BigDecimal budgetid;

    @TableField("CONTRACTID")
    private Integer contractid;//合同id

    @TableField("CREATESTAFF")
    private BigDecimal createstaff;

    @TableField("LINKORG")
    private BigDecimal linkorg;

    @TableField("PAYMENMONEY")//已付款金额//开票金额
    private BigDecimal paymenmoney;

    @Transient//未付款金额
    private BigDecimal noPaymoney;

    @TableField("PAYMENTTITLE")//标题
    private String paymenttitle;

    @TableField("APPLYSTAFF")
    private BigDecimal applystaff;

    @TableField("APPLYORG")
    private BigDecimal applyorg;
    @Transient//部门id
    private BigDecimal applyOrgId;

    @TableField("PAYMENTRECORD")//款项类别
    private String paymentrecord;

    @TableField("PAYMENTTYPE")//付款方式
    private String paymenttype;

    @TableField("PAYMENTLATEDATE")//开票日期
    @JSONField(format = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date paymentlatedate;

    @TableField("PAYMENTMEMO")
    private String paymentmemo;//备注

    @TableField("PAYMENTSTATUS")
    private Long paymentstatus;

    @TableField("APPLYDATE")
    @JSONField(format = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date applydate;//申请日期

    @TableField("COUNTERBANK")
    private BigDecimal counterbank;//收款银行账号

    @TableField("ORGBANK")
    private BigDecimal orgbank;//付款银行账号
    
    @TableField("INVOICEID")
    private BigDecimal invoiceid;
    @Transient
    private TblStaffUtil staff;

    @Transient
    private TblCyhwUnit contract;

    @Transient
    private TblCyhwProjectbudget budget;

    @Transient
    private TblContractPlannode node;

    @Transient//执行人
    private String executestaff;//TblFormControllog

    //映射TblCyhwUnit与TblCyhwProjectbudget与TblStaff与TblOrganization与TblContractPlannode与TblCyhwProjectbudget


    @ApiModelProperty(value = "隶属流程id 关联Tbl_flow flowid")
    @Transient
    private BigDecimal flowid;

    @ApiModelProperty(value = "单位名称")
    @Transient
    private String unitname;

    @ApiModelProperty(value = "合同名称")
    @Transient
    private String contractname;

    @ApiModelProperty(value = "合同编号")
    @Transient
    private String contractno;

    @ApiModelProperty(value = "承办部门")
    @Transient
    private BigDecimal contractdept;

    @ApiModelProperty(value = "合同对方")
    @Transient
    private String contractlink;

    @ApiModelProperty(value = "合同金额")
    @Transient
    private BigDecimal contractmoney;//合同总金额

    @ApiModelProperty(value = "合同状态 1-审批中、2-需调整、3-已通过、4-已终止、5-已跟踪、6-已完成、7-执行中、		8-已归档、		9-已暂停、		10-已变更、		11-已终止、		12-纠纷中、		13-协商中、		14-诉讼中、		15-仲裁中、		16-已结案")
    @Transient
    private Integer contractstatus;

    @ApiModelProperty(value = "关联科室")
    @Transient
    private String linkdept;

    @ApiModelProperty(value = "隶属组织")
    @Transient
    private BigDecimal orgid;

    @ApiModelProperty(value = "创建人")
    @Transient
    private BigDecimal createuser;

    @ApiModelProperty(value = "创建时间")
    @Transient
    @JSONField(format = "yyyy-MM-dd")
    @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
    private Date createtime;

    @ApiModelProperty(value = "合同简要说明")
    @Transient
    private String momoconcat;

    @ApiModelProperty(value = "关联的风险控制")
    @Transient
    private String riskcontrol;

    @ApiModelProperty(value = "合同内容")
    @Transient
    private String describe;

    @ApiModelProperty(value = "承办人")
    @Transient
    private BigDecimal contractstaff;

    @ApiModelProperty(value = "保密等级")
    @Transient
    private String scrilevel;

    @ApiModelProperty(value = "合同开始时间")
    @Transient
    @JSONField(format = "yyyy-MM-dd")
    private Date startdate;

    @ApiModelProperty(value = "合同结束时间")
    @Transient
    @JSONField(format = "yyyy-MM-dd")
    private Date enddate;

    @ApiModelProperty(value = "合同项目")
    @Transient
    private String contractitem;

    @ApiModelProperty(value = "合同类型")
    @Transient
    private String contracttype;

    @ApiModelProperty(value = "合同期限类型")
    @Transient
    private String contractdatetype;

    @ApiModelProperty(value = "合同性质")
    @Transient
    private String contractxz;

    @ApiModelProperty(value = "合同相对方主键ID")
    @Transient
    private BigDecimal contractxdfxinfo;

    @ApiModelProperty(value = "合同类型 HTGL001 - 相对方、HTGL002-合同订立、HTGL003-合同用印、HTGL004-合同履行、HTGL005-变更、HTGL006-合同归档、HTGL007-合同范本")
    @Transient
    private String recordtype;

    @ApiModelProperty(value = "隶属合同 cyhwunitId")
    @Transient
    private BigDecimal recordparent;

    @ApiModelProperty(value = "合同金额汉字描述")
    @Transient
    private String hzsumowing;

    @ApiModelProperty(value = "计价方式")
    @Transient
    private String jijiatype;

    @ApiModelProperty(value = "币种")
    @Transient
    private String moneytype;

    @ApiModelProperty(value = "首付方向")
    @Transient
    private String dctype;

    @ApiModelProperty(value = "合同标的")
    @Transient
    private String contractbd;

    @ApiModelProperty(value = "是否重大合同")
    @Transient
    private String contractzd;

    @ApiModelProperty(value = "经办人")
    @Transient
    private BigDecimal jbstaff;

    @ApiModelProperty(value = "经办部门")
    @Transient
    private BigDecimal jbdept;

    @ApiModelProperty(value = "经办公司")
    @Transient
    private BigDecimal jbunit;

    @ApiModelProperty(value = "执行公司")
    @Transient
    private BigDecimal zxunit;

    @ApiModelProperty(value = "是否关联主合同")
    @Transient
    private String contractchildren;

    @ApiModelProperty(value = "是否有履行计划")
    @Transient
    private String contractplan;

    @ApiModelProperty(value = "合同立项信息")
    @Transient
    private String topicid;

    @ApiModelProperty(value = "合同立项名称")
    @Transient
    private String topicname;

    @ApiModelProperty(value = "历史状态")
    @Transient
    private BigDecimal hiscontractstatus;

    @ApiModelProperty(value = "变更类型")
    @Transient
    private String changetype;

    @ApiModelProperty(value = "变更时间")
    @Transient
    @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
    private LocalDateTime changedate;

    @ApiModelProperty(value = "变更内容")
    @Transient
    private String changedesc;

    @Transient
    private BigDecimal counterpartbank;


//TblCyhwProjectbudget
    @Transient
    @ApiModelProperty(value = "相对方名称")
    private String budgetname;

    @Transient
    @ApiModelProperty(value = "注册资本")
    private String totaltmoney;

    @Transient
    @ApiModelProperty(value = "所属行业")
    private String financemoney;

    @Transient
    @ApiModelProperty(value = "第三方编号")
    private String othermoney;

    @Transient
    @ApiModelProperty(value = "货物类外键")
    private Integer goodstype;

    @Transient
    @ApiModelProperty(value = "服务类 内外部")
    private String servicetype;

    @Transient
    @ApiModelProperty(value = "相对方性质")
    private String projecttype;

    @Transient
    @ApiModelProperty(value = "相对方类型")
    private String orthertype;

    @Transient
    @ApiModelProperty(value = "是否是政府采购 1是 2否")
    private Integer isgovernment;

    @Transient
    @ApiModelProperty(value = "是否是直接支付1是 2否")
    private Integer isdirect;

    @Transient
    @ApiModelProperty(value = "支出项目类别 1.经常性 2.一次性")
    private Integer itembudgettype;

    @Transient
    @ApiModelProperty(value = "统一社会信用代码")
    private String projecteason;

    @Transient
    @ApiModelProperty(value = "项目总体目标 自编号")
    private String projectgoal;

    @Transient
    @ApiModelProperty(value = "法定代表人姓名")
    private String projectstagegoal;

    @Transient
    @ApiModelProperty(value = "法定代表人身份证")
    private String projectcondition;

    @Transient
    @ApiModelProperty(value = "证件类型")
    private String projectrisk;

    @Transient
    @ApiModelProperty(value = "关联部门")
    private Integer linkdepr;

    @Transient
    @ApiModelProperty(value = "报送单位部门")
    private Integer reporttodept;

    @Transient
    @ApiModelProperty(value = "审批状态  1-审批中、2-需调整、3-已通过、4-已终止、5-已跟踪、6-已完成、else-未审批 ")
    private Integer inspectionstatus;

    @Transient
    @ApiModelProperty(value = "货物单价")
    private BigDecimal goodsprice;

    @Transient
    @ApiModelProperty(value = "货物数量")
    private BigDecimal goodsamount;

    @Transient
    @ApiModelProperty(value = "货物型号")
    private String goodsmodel;

    @Transient
    @ApiModelProperty(value = "相对方编号")//合同向对方
    private String counterpartno;

    @Transient
    @ApiModelProperty(value = "相对方地址")
    private String counterpartaddress;

    @Transient
    @ApiModelProperty(value = "邮编")//
    private String counterpartcode;

    @Transient
    @ApiModelProperty(value = "开户银行")
    private String counterparthank;

    @Transient
    @ApiModelProperty(value = "开户银行账号")
    private String counterparthankaccount;

    @Transient
    @ApiModelProperty(value = "网址")
    private String counterpartnetaddress;

    @Transient
    @ApiModelProperty(value = "相对方电话")
    private String counterpartphone;

    @Transient
    @ApiModelProperty(value = "关联的相对方信息")
    private Integer recordconcat;

    @Transient
    @ApiModelProperty(value = "地址")
    private String action;

    @Transient
    @ApiModelProperty(value = "e签宝流程Id")
    private String eqbflowid;

    @Transient
    private String bizno;

    @Transient
    @ApiModelProperty(value = "纳税人识别号")
    private String resultdescription;

    @Transient
    private Integer eqbstatus;

    @Transient
    private String flowtype;

    @Transient
    @ApiModelProperty(value = "附件查看地址")
    private String eabfileck;

    @Transient
    @ApiModelProperty(value = "附件下载地址")
    private String fileurl;

    @Transient
    @ApiModelProperty(value = "相对方性质")
    private String oppositenature;

    @Transient
    @ApiModelProperty(value = "相对方类型")
    private String counterparttype;

    @Transient
    @ApiModelProperty(value = "是否有效")
    private String iseffect;

    @Transient
    @ApiModelProperty(value = "相对方简介")
    private String counterpartdesc;

    @Transient
    @ApiModelProperty(value = "保管部门")
    private Integer safeorg;

    @Transient
    @ApiModelProperty(value = "保管员")
    private Integer safestaff;

    @Transient
    @ApiModelProperty(value = "档案有效期、黑明单有效期")
    private Date effectdate;

    @Transient
    @ApiModelProperty(value = "归档日期")
    private Date safedate;

    @ApiModelProperty(value = "负责人")
    @Transient
    private String director;

    @ApiModelProperty(value = "联系人")
    @Transient
    private String contacts;

    @ApiModelProperty(value = "联系人电话")
    @Transient
    private String contactsphone;

    @ApiModelProperty(value = "联系地址")
    @Transient
    private String contactsadress;

    @ApiModelProperty(value = "电子邮箱")
    @Transient
    private String contactsemail;

    @ApiModelProperty(value = "岗位")
    @Transient
    private String station;

    @ApiModelProperty(value = "称呼")
    @Transient
    private String callname;

    @ApiModelProperty(value = "备注")
    @Transient
    private String remarks;

    @Transient
    @ApiModelProperty(value = "是否加入黑名单 1是 2否")
    private Integer isblack;

    @Transient
    @ApiModelProperty(value = "黑名单类型   1 短期   2长期")
    private Integer blacktype;

    @Transient
    @ApiModelProperty(value = "证件有效期")
    @JSONField(format = "yyyy-MM-dd")
    private Date pstartdate;

    @Transient
    @ApiModelProperty(value = "证件有效期")
    @JSONField(format = "yyyy-MM-dd")
    private Date penddate;

    @Transient
    @ApiModelProperty(value = "证件编号")
    private String cretificateno;


    //TblStaff
    @Transient
    private BigDecimal staffid;
    @Transient
    private String realname;//真实名字或经办人


    @Transient
    @ApiModelProperty(value = "公司名称")
    private String orgname;

    @Transient//TblContractPlannode
    private String nodecontent;//付款计划
    @Transient
    private String nodepost;

    @Transient//TBL_COUNTERPART_BANKINFO
    private String bankaccname;//银行账户

    @Transient
    private BigDecimal bankbankid;
    @Transient
    private BigDecimal bankid;

    @Transient//TblContractSpnode
    private BigDecimal nodemoney;//付款金额

    @Transient
    private  BigDecimal paymentmoney;//
    @Transient//开票单位
    private String invoicekporg;


    @Transient//发票类型//TblContractInvoicesmanagemen
    private String invoicetype;
    @Transient//发票开具日期
    @JSONField(format = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date invoicedate;
    @Transient//发票号
    private String invoiceno;
    @Transient//发票状态
    private BigDecimal invoicestatus;
    @Transient
    private BigDecimal invoicemoney;
    @Transient//发票抬头
    private String invoiceheadtext;


    //TblOrganization
    @Transient
    private BigDecimal fatherorgid;
    @Transient
    @ApiModelProperty(value = "公司编号")
    private String orgnumber;
    @Transient
    @ApiModelProperty(value = "公司简介")
    private String orgmeno;//申请部门
    @Transient
    @ApiModelProperty(value = "备注")
    private String memo;
    @Transient
    private String icode;
    @Transient
    private Integer orgtype;
    @Transient
    private Integer auditType;
    @Transient
    private Integer status;
    @Transient
    private String iszy;
    @Transient
    private String hyzsktype;
    @Transient
    private Integer orderid;
    @Transient
    private Integer outsideid;
    @Transient
    private String outsideopendid;
    @ApiModelProperty(value = "是否使用自动编号 0 不使用；1 使用")
    @Transient
    private Integer isautonumber;
    @Transient
    @JSONField(format = "yyyy-MM-dd")
    private Date orgcreate;
    @Transient
    private Integer isinitialization;
    @ApiModelProperty(value = "职务")
    @Transient
    private String duties;
    @ApiModelProperty(value = "行业编号")
    @Transient
    private Integer industryid;
    @ApiModelProperty(value = "新增来源于微信 1为微信 0为pc")
    @Transient
    private String bywx;
    @Transient
    private String datasource;
    @Transient
    private String historycode;
    @Transient
    private String historydepartmentid;

    //TblOrgBankaccount
    @Transient//付款银行账户
    private String bankaccnum;
    @Transient//收款银行账户
    private String bankaccount;
    @Transient
    private BigDecimal APSSTAFFID;
    @Transient
    private String APSREALNAME;
    @Transient
    private BigDecimal APOORGID;
    @Transient
    private String APOORGNAME;
    @Transient
    private BigDecimal PAYMONEY;
    @Transient
    private BigDecimal FKMONEY;
}
